package com.chuangjiangx.member.coupon.ddd.domain.model;

/**
 * Created by Lenovo on 2018/8/30.
 */
public enum WxSyncStatus {
    NOT_SYNC("未同步",0),
    SYNCED("已同步",1);

    public final String name;
    public final Integer code;

    WxSyncStatus(String name,Integer code) {
        this.name = name;
        this.code = code;
    }

    public static WxSyncStatus getWxSyncStatus(Integer code) {
        for (WxSyncStatus wxSyncStatus : values()) {
            if (wxSyncStatus.code.equals(code)) {
                return wxSyncStatus;
            }
        }
        return null;
    }
}
